package com.cya.原型模式;

/**
 * @author ：陈奕安（3048279304@qq.com）
 * @date ：Created in 2025/5/19 21:31
 * @description：
 * @modified By：
 * @version:
 */
public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        StudentPrototype pro=new StudentPrototype("软件学院陈奕安","21");
        System.out.println(pro);
        StudentPrototype clone=pro.clone();
        clone.setName("陈奕安副本");
        System.out.println(clone);
        System.out.println("****克隆对象和原对象是否相等？****");
        System.out.println(pro.equals(clone));
    }
}